package org.roguelikedevelopment.dweller.gamedata;

public class Colors {

	public static final int COLORS[] = {
		0x000000,		// BLACK
		0x555555,		// DARKGREY
		0x888888,		// MEDIUMGREY
		0xCCCCCC,		// LIGHTGREY
		0xFFFFFF,		// WHITE
		0xFF0000,		// RED
		0x00FF00,		// GREEN
		0x0000FF,		// BLUE
		0xFFFF00,		// YELLOW
		0xFF00FF,		// PURPLE
		0xDD8800,		// BROWN
		0x005500,		// DARKGREEN
		0x000055		// DARKBLUE
	};
	public static final byte DARKBLUE = 12;
	public static final byte DARKGREEN = 11;
	public static final byte BROWN = 10;
	public static final byte PURPLE = 9;
	public static final byte YELLOW = 8;
	public static final byte BLUE = 7;
	public static final byte GREEN = 6;
	public static final byte RED = 5;
	public static final byte WHITE = 4;
	public static final byte LIGHTGREY = 3;
	public static final byte MEDIUMGREY = 2;
	public static final byte DARKGREY = 1;
	public static final byte BLACK = 0;
	public static final byte TRANSPARENT = -1;
	
	private static final String COLOR_STRINGS[] = {
		"BLACK",
		"DARKGREY",
		"MEDIUMGREY",
		"LIGHTGREY",
		"WHITE",
		"RED",
		"GREEN",
		"BLUE",
		"YELLOW",
		"PURPLE",
		"BROWN",
		"DARKGREEN",
		"DARKBLUE"
	};
	
	public static int getColorIdFromString(String s) {
		s = s.toUpperCase();
		for(int i = 0; i < COLOR_STRINGS.length; i++) {
			if(COLOR_STRINGS[i].equals(s)) {
				return i;
			}
		}
		return BLACK;
	}

}
